<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //构造函数 1.首字母大写 2.this指向实例化对象 
        function Person(name){
            //this.num = 0
            this.name = name
            this.age = 20
            this.hobby = function(){
                console.log("喜欢篮球")
            }
        }
        //静态成员
        Person.num = 0
        Person.fn = function(){
            console.log("静态方法")
        }
        //new ： 实例化
        let zhangsan = new Person("张三")
        Person.num++


        //静态属性和方法： （属于类本身的）
    </script>
</body>
</html>